# include the Rules.axis file
AXIS_USABLE_LIBS = GLIBC
include $(AXIS_TOP_DIR)/tools/build/Rules.axis

all: Batterie_WS Vitesse_WS Freinage_WS UpdateVitesse_WS FinCourseDroite_WS FinCourseGauche_WS UpdateDirection_WS
	
Freinage_WS: Freinage_WS.o CAN_I.o Utils.o cJSON.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o ./bin/$@ -lpcan -lm

Batterie_WS: Batterie_WS.o CAN_I.o Utils.o cJSON.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o ./bin/$@ -lpcan -lm
	
Vitesse_WS: Vitesse_WS.o CAN_I.o Utils.o cJSON.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o ./bin/$@ -lpcan -lm
	
UpdateVitesse_WS: UpdateVitesse_WS.o CAN_I.o Utils.o cJSON.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o ./bin/$@ -lpcan -lm
	
FinCourseDroite_WS: FinCourseDroite_WS.o CAN_I.o Utils.o cJSON.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o ./bin/$@ -lpcan -lm
	
FinCourseGauche_WS: FinCourseGauche_WS.o CAN_I.o Utils.o cJSON.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o ./bin/$@ -lpcan -lm
	
UpdateDirection_WS: UpdateDirection_WS.o CAN_I.o Utils.o cJSON.o
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o ./bin/$@ -lpcan -lm

clean:
	rm -f ./bin/* *.o
